// 自动给console添加位置信息
const targetCalleeName = ['log', 'info', 'error', 'debug'].map((item) => `console.${item}`);
const generate = require('@babel/generator').default;
module.exports = function ({ types, template }) {
  return {
    visitor: {
      CallExpression(path, state, scope) {
        if (
          path.node.callee &&
          types.isIdentifier(path.node.callee.object, { name: "console" })
        ) {
          path.remove()
        }
      },
    },
  };
};
